<?php
namespace app\wxapp\controller;
use app\common\entity\Result;
use app\Request;
use think\facade\Db;

/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/10/4 0004
* Time: 19:51
*/
class Banner extends Base{

    /**
     * 获取首页banner列表
     * @param Request $request
     * @return \think\Response
     */
    public function index(Request $request){
        $position = $request->param('position','1');
        $all = Db::table('banner')->where(['position'=>$position])->select();
        return Result::success($all);
    }

}